home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-01 | 3.3 KB | 142 lines | [TEXT/MPS ] |
- ;
- ; File: NVRAM.a
- ;
- ; Contains: NVRAM FPI data structures and function prototypes
- ;
- ; Version: Technology:
- ; Release: Universal Interfaces 3.0d3 on Copland DR1
- ;
- ; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
- ;
- ; Bugs?: If you find a problem with this file, send the file and version
- ; information (from above) and the problem description to:
- ;
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
- IF &TYPE('__NVRAM__') = 'UNDEFINED' THEN
- __NVRAM__ SET 1
-
- IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
- include 'Types.a'
- ENDIF
- IF &TYPE('__KERNEL__') = 'UNDEFINED' THEN
- include 'Kernel.a'
- ENDIF
- IF &TYPE('__OSUTILS__') = 'UNDEFINED' THEN
- include 'OSUtils.a'
- ENDIF
- IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
- include 'Errors.a'
- ENDIF
- IF FOR_SYSTEM8_PREEMPTIVE THEN
- ;
- ; NVRAM Error Return Code
- ;
-
- NVRAMnoErr EQU 0
- NVRAMInvalidParm EQU -50
- NVRAMReadFailed EQU -19
- NVRAMWriteFailed EQU -20
- NVRAMServiceFailed EQU -18
- NVRAMInstallFailed EQU -26
- ;
- ; NVRAM Request Code
- ;
-
- kNVRAMpramInitMsg EQU 1
- kNVRAMpramReadMsg EQU 2 ; This include read access to System Parameters and XPRAM
- kNVRAMpramWriteMsg EQU 3 ; This include write access to System Parameters and XPRAM
- kNVRAMrpramReadMsg EQU 4
- kNVRAMrpramWriteMsg EQU 5
- kNVRAMReadMsg EQU 6
- kNVRAMWriteMsg EQU 7
- kNVRAMOpenFirmwareReadMsg EQU 8
- kNVRAMOpenFirmwareWriteMsg EQU 9
- kNVRAMNameRegistryReadMsg EQU 10
- kNVRAMNameRegistryWriteMsg EQU 11
- kNVRAMRqstLimit EQU 12
- ;
- ; Function : NVRAMFPIInit
- ;
- ; Description : Find the Object Id property in the family-tree
- ; This is essential for message passing between FPI and kernel server task.
- ; This is the main entry for the NVRAMFPI library, and will be called when
- ; FPI library is loaded by the CFM.
- ;
- ;
- ; extern OSStatus NVRAMFPIInit(void )
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION NVRAMFPIInit
- ENDIF
-
- ;
- ; Function : NVRAMAccessSync
- ;
- ; Description : This is common entry point for synchronous access to NVRAM hardware.
- ; This is an export in the NVRAMFPI library.
- ;
- ;
- ; extern OSStatus NVRAMAccessSync(UInt32 offset, Byte *accessData, ByteCount sizeofAccess, UInt32 typeOfRequest)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION NVRAMAccessSync
- ENDIF
-
- ;
- ; Function : NVRAMAccessAsync
- ;
- ; Description : This is common entry point for asynchronous access to NVRAM hardware
- ; This is an export in the NVRAMFPI library.
- ;
- ;
- ; extern OSStatus NVRAMAccessAsync(UInt32 offset, Byte *accessData, ByteCount sizeofAccess, void *someTypeofNotification, UInt32 typeOfRequest, ByteCount *replySize, MessageID *msgID)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION NVRAMAccessAsync
- ENDIF
-
- ;
- ; Test APIs or SPIs
- ;
- ;
- ; pascal OSErr myInitUtil(void )
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION myInitUtil
- ENDIF
-
- ;
- ; pascal SysPPtr myGetSysPPtr(void )
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION myGetSysPPtr
- ENDIF
-
- ;
- ; pascal OSErr myWriteParam(void )
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION myWriteParam
- ENDIF
-
- ;
- ; pascal OSErr myWriteXPRAM(UInt32 offset, Byte *accessdata, ByteCount numberOfBytes)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION myWriteXPRAM
- ENDIF
-
- ;
- ; pascal OSErr myReadXPRAM(UInt32 offset, Byte *accessdata, ByteCount numberOfBytes)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION myReadXPRAM
- ENDIF
-
- ENDIF
- ENDIF ; __NVRAM__
-
-